<?php

namespace App\Console\Commands;

use App\Imports\DomainImport;
use Illuminate\Console\Command;

class Import extends Command
{
    public function __construct()
    {
        parent::__construct();
    }
    protected $signature = 'import:excel';

    protected $description = 'DomainInduce importer';

    public function handle()
    {
        $start = microtime(true);
        $this->output->title('Starting import');
        (new DomainImport())->withOutput($this->output)->import('upload/excel/工作簿1w.xlsx', 'public');
       // (new DomainImport())->withOutput($this->output)->queue('upload/excel/工作簿1.xlsx', 'public');
        $time = microtime(true) - $start;
        $this->output->success('Import successful'.PHP_EOL.number_format($time,4));
    }

}
